#!/bin/fish

set ip $(adb shell ifconfig | grep -oE 'inet addr:[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+' | grep -oE '[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+' | grep '192.168.31')
echo ip:$ip
adb tcpip 5555
adb connect $ip:5555
scrcpy -e --turn-screen-off
